package com.lzy.crm.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.lzy.crm.base.mybatis.BaseMapper;
import com.lzy.crm.base.mybatis.Example;
import com.lzy.crm.base.service.BaseServiceImpl;
import com.lzy.crm.dao.GameRecordTableMapper;
import com.lzy.crm.dao.criteria.GameRecordTableCriteria;
import com.lzy.crm.domain.GameRecordTable;
import com.lzy.crm.service.GameRecordTableService;

@Service("gameRecordTableService")
public class GameRecordTableServiceImpl extends BaseServiceImpl<GameRecordTable, GameRecordTableCriteria> implements GameRecordTableService {

	@Resource
	private GameRecordTableMapper gameRecordTableMapper;
	
	@Override
	public BaseMapper<GameRecordTable, GameRecordTableCriteria> getBaseMapper() {
		return gameRecordTableMapper;
	}

	
	/**
	 * 查看回放
	 * @param roomId
	 * @param createTime
	 * @return
	 */
	public List<GameRecordTable> getGameRecordTableList(String roomId,String createTime) {
		Example<GameRecordTableCriteria> example = new Example<GameRecordTableCriteria>(GameRecordTableCriteria.class);
		GameRecordTableCriteria gameRecordTableCriteria = example.createCriteria();
		gameRecordTableCriteria.andRoomIdEqualTo(roomId);
		gameRecordTableCriteria.andCreateTimeEqualTo(createTime);
		return gameRecordTableMapper.getListByExample(example); 
	}
	
	
}
